from WebBackend.dataclass.Configuration import ConfigurationItem

VIRTUAL_USER_OPTIONS: list[ConfigurationItem] = [
    {
        "key": "anonymous_enable",
        "description": "禁止匿名登录（虚拟用户通常需要禁用匿名）",
        "default": 'NO',
        "recommended": 'NO'
    },
    {
        "key": "chroot_local_user",
        "description": "将用户限制在其家目录中",
        "default": 'NO',
        "recommended": 'YES'
    },
    {
        "key": "guest_enable",
        "description": "启用虚拟用户功能（关键选项）",
        "default": 'NO',
        "recommended": 'YES'
    },
    {
        "key": "guest_username",
        "description": "虚拟用户映射到的系统用户（如ftpsecure或vftp）",
        "default": "ftp",
        "recommended": "自定义用户"
    },
    {
        "key": "virtual_use_local_privs",
        "description": "虚拟用户使用与本地用户相同的权限",
        "default": 'NO',
        "recommended": 'YES'
    },
    {
        "key": "user_config_dir",
        "description": "每个虚拟用户的独立配置文件目录（重要）",
        "default": "",
        "recommended": "/etc/vsftpd_user_conf"
    },
    {
        "key": "allow_writeable_chroot",
        "description": "允许被chroot的用户有写权限",
        "default": 'NO',
        "recommended": 'YES'
    },
    {
        "key": "pasv_min_port",
        "description": "被动模式最小端口（安全增强）",
        "default": 0,
        "recommended": "如：40000"
    },
    {
        "key": "pasv_max_port",
        "description": "被动模式最大端口（安全增强）",
        "default": 0,
        "recommended": "如：45000"
    },
    {
        "key": "pam_service_name",
        "description": "指定PAM服务名（通常为vsftpd或自定义）",
        "default": "vsftpd",
        "recommended": "需与PAM配置匹配"
    }
]
